package com.madzone.gae.lucene.store;

import java.io.IOException;

import org.apache.lucene.store.BufferedIndexInput;
import org.apache.lucene.store.BufferedIndexOutput;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.store.IndexOutput;
import org.apache.lucene.store.Lock;

import com.madzone.gae.filem.model.BinaryFile;
import com.madzone.gae.filem.model.File;

public class GoogleDataStoreDirectory extends Directory {
	
	private String m_directoryName;
	
	public GoogleDataStoreDirectory(String directoryName) {
		m_directoryName = directoryName;
	}

	@Override
	public void close() throws IOException {
		// TODO Auto-generated method stub

	}

	@Override
	public IndexOutput createOutput(String arg0) throws IOException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void deleteFile(String arg0) throws IOException {
		// TODO Auto-generated method stub

	}

	@Override
	public boolean fileExists(String arg0) throws IOException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public long fileLength(String arg0) throws IOException {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public long fileModified(String arg0) throws IOException {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public String[] list() throws IOException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Lock makeLock(String arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public IndexInput openInput(String arg0) throws IOException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void renameFile(String arg0, String arg1) throws IOException {
		// TODO Auto-generated method stub

	}

	@Override
	public void touchFile(String arg0) throws IOException {
		// TODO Auto-generated method stub

	}
	
	public static class GoogleDataStoreIndexInput extends IndexInput {
		
		private String m_fileName;
		
		public GoogleDataStoreIndexInput(String fileName) {
			m_fileName = fileName;
		}

		@Override
		public void close() throws IOException {
			// TODO Auto-generated method stub
			
		}

		@Override
		public long getFilePointer() {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public long length() {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public byte readByte() throws IOException {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public void readBytes(byte[] arg0, int arg1, int arg2)
				throws IOException {
			// TODO Auto-generated method stub
			
		}

		@Override
		public void seek(long arg0) throws IOException {
			// TODO Auto-generated method stub
			
		}
		
		
		
	}
	
	public static class GoogleDataStoreIndexOutput extends IndexOutput {
		
		private String m_fileName;
		
		private File<BinaryFile> gdsFile;
				
		public GoogleDataStoreIndexOutput(String fileName) {
			m_fileName = fileName;
			gdsFile = BinaryFile.getByName(fileName);
		}

		@Override
		public void close() throws IOException {
			// TODO Auto-generated method stub
			
		}

		@Override
		public void flush() throws IOException {
			// TODO Auto-generated method stub
			
		}

		@Override
		public long getFilePointer() {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public long length() throws IOException {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public void seek(long arg0) throws IOException {
			// TODO Auto-generated method stub
			
		}

		@Override
		public void writeByte(byte arg0) throws IOException {
			// TODO Auto-generated method stub
			
		}

		@Override
		public void writeBytes(byte[] arg0, int arg1) throws IOException {
			// TODO Auto-generated method stub
			
		}
		
	}

}
